home *** CD-ROM | disk | FTP | other *** search
/ Know Your Hockey - The Greatest Player Resource / Know Your Hockey: The Greatest Player Resource.iso / hockey / director / ssqcst.cst / 00109_Script_rollover_module < prev    next >
Text File  |  1998-09-28  |  2KB  |  64 lines

  1. global EnterRollist,XitRollist,lastrollover,thisrollover
  2.  
  3.  
  4. --- put the name of the handler that you want executed
  5. -- for a specific sprite when the rollover occurs
  6. --  in the internal cast in a field called onlist
  7. -- egsprite 4 ijn list four
  8. -- the first item in the line should be a number then the
  9. -- desired commend separated by a ",'
  10. -- the off list affects what happens when the rollover ends
  11. -- and also requires a handler to be named
  12. -- if no name is present nothing will happen
  13. -- however both onlist and off list must have 48 lines with
  14. -- a number at the start of each of the 48 lines
  15.  
  16. on initrolloverKit
  17.   set EnterRollist = []
  18.   set XitRollist = []
  19.   set the itemDelimiter = ","
  20.   repeat with x = 1 to 48
  21.     set t = item 2 of (line x of field "onlist" of castlib "SSQCST")
  22.     setat(EnterRollist,x,t)
  23.     set r = item 2 of (line x of field "offlist" of castlib "SSQCST")
  24.     setat(XitRollist,x,r)
  25.   end repeat 
  26. end
  27.  
  28.  
  29. on testforrollovers
  30.   set thisrollover = the rollover
  31.   if thisrollover = 0 then exit
  32.   if (thisRollover <> LastRollover) then
  33.     if lastRollover > 0 then
  34.       do getat(Xitrollist,lastrollover)
  35.     end if
  36.     do getat(EnterRollist, thisrollover)
  37.     set lastrollover = thisRollover
  38.   end if
  39. end
  40.  
  41. -- turns coach or announcer icon off at end of file
  42. on soundover
  43.   if soundbusy(1) then exit
  44.   set flag1 = getat(gbuttonstate,40)
  45.   set flag2 =  getat(gbuttonstate,41)
  46.   set flag = max(flag1,flag2)
  47.   if flag > 0 then
  48.     Autoresetbanner
  49.   end if   
  50. end
  51.  
  52. on autoresetbanner
  53.   repeat with y = 41 down to 40
  54.     set thisone = getat(gbuttonState,y)
  55.     if thisone > 0  then 
  56.       set the membernum of sprite y = the membernum of sprite y -1
  57.       setat(gbuttonState,y,0)
  58.       exit repeat
  59.     end if
  60.   end repeat 
  61.   if the rollover <> y then set the blend of sprite y = 0
  62.   updatestage
  63. end
  64.